package com.cjw.campus.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 提问表
 * </p>
 *
 * @author cjw
 * @since 2023-03-06
 */
@Getter
@Setter
@TableName("questions_table")
@Schema(name = "QuestionsTable", description = "$!{table.comment}")
public class QuestionsTable implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "提问ID")
    @TableId(value = "questions_id", type = IdType.AUTO)
    private Long questionsId;

    @Schema(description = "提问标题")
    private String questionsTitle;

    @Schema(description = "提问内容")
    private String questionsContent;

    @Schema(description = "前台用户ID")
    private Long foreground_user_id;

    @Schema(description = "提问图片")
    private String questionsImg;

    @Schema(description = "学科ID")
    private Long subjectId;

    @Schema(description = "提问类型[0：普通题、1：悬赏题、2：私密题]")
    private Integer questionsType;

    @Schema(description = "浏览数")
    private Integer browseNumber;

    @Schema(description = "点评数")
    private Integer reviewsNumber;

    @Schema(description = "评论数")
    private Integer commentsNumber;

    @Schema(description = "点赞数")
    private Integer kudosNumber;

    @Schema(description = "收藏数")
    private Integer collectionNumber;

    @Schema(description = "回答数")
    private Integer replyNumber;

    @Schema(description = "悬赏金额")
    private Integer rewardAmount;

    @Schema(description = "答题积分")
    private Integer answerPoints;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createor;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updater;

    @Schema(description = "删除标志")
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Boolean deleteFlag;
}
